#include "stdafx.h"

#include "math.h"

CVector::CVector()
{
	x = y = z = 0.0f;
}

CVector::CVector(float vx, float vy, float vz)
{
	x = vx;
	y = vy;
	z = vz;
}

CVector::~CVector()
{
}

CVector CVector::operator+(CVector& v)
{
	return CVector(x + v.x, y + v.y, z + v.z);
}

CVector CVector::operator-(CVector& v)
{
	return CVector(x - v.x, y - v.y, z - v.z);
}

CVector CVector::operator*(float s)
{
	return CVector(x * s, y * s, z * s);
}

CVector CVector::operator/(float s)
{
	return CVector(x / s, y / s, z / s);
}

